<template>
    <div >
        <div v-show="!isdetail">
            <Table :lists="lists" @tableLiTap="tableLiTap"></Table>
            <!--分页-->
            <PageDevice :pagedata="pagedata"></PageDevice>
        </div>
        <!--详情-->
        <div v-show="isdetail">
            <div class="pl29 pr30">
                <p class="fs26 c333 lh40 textc pt38">平安银行签约、出入金操作指南</p>
                <p class="fs14 c999 lh20 textc bbeee pt25 pb35">
                    <span class="pr25">更新时间：2018-08-12</span>
                    <span>来源:中国茶叶学会</span>
                </p>
            </div>
            <div class="pt32 w100p fs14 c333 lh25 pl48 pr74 textc lh72">
                <p>《平安银行电子商务“银商结算通”服务个人会员操作手册》（我行会员、非我行会员）.pdf</p>
                <p>《平安银行电子商务“银商结算通”服务企业会员操作手册》（我行会员、非我行会员）.pdf</p>
            </div>
        </div>
    </div>
</template>

<script>
    import Table from './../commons/Table'
    import PageDevice from './../commons/PageDevice'
    export default {
        name: "TradeGuide",
        components:{Table,PageDevice},
        data(){
            return{
                lists:[
                    {title:'平安银行签约、出入金操作指南',time:'2018-08-28'},
                    {title:'中国农业银行绑定操作须知',time:'2018-08-28'},
                    {title:'中国建设银行签约操作指南',time:'2018-08-28'},
                    {title:'中国工商银行签约操作指南',time:'2018-08-28'},
                    {title:'中国民生银行签约操作指南',time:'2018-08-28'},
                ],
                pagedata:{
                    pager_count:5,
                    page_size:20,
                    total:100
                },
                isdetail:false,//是否显示详情
            }
        },
        created(){
            if(this.$route.matched[0].path=='/information' && this.$route.query.i >=0 ){
                this.isdetail = true;
                this.$emit('detailTap',this.$route.query.i);
            }else{
                this.isdetail = false;
            }
        },
        watch:{
            '$route'(to,from){
                var v = this , _path = '';
                if(to.matched[0].path=='/instructions'){
                    if(to.query.i>=0){
                        this.isdetail = true;
                    }else{
                        this.isdetail = false;
                    }
                }
            }
        },
        methods:{
            tableLiTap(index){//选择进入详情
                this.$emit('detailTap',index,this.lists[index].title);
                this.isdetail = true;
            }
        }
    }
</script>

<style>

</style>






















